Ext.define('Intranet.Desktop.view.PersonalView', {
    extend: 'Ext.view.View',
    alias: 'widget.desktop_personalview',
    
    id: 'personal-icon',
    
    itemSelector: 'div.thumb-wrap',
    
    border: false,
    
    tpl: [
            '<tpl for=".">',
                '<tpl if="group_id==3">',
                    '<div class="thumb-wrap">',
                        '<div class="thumb">',
                            '<img src="app/modules/{key_name}/images/icons/{icon}" height="48"/>',
                        '</div>',
                    '</div>',
                '</tpl>',
            '</tpl>'
    ],
    
    initComponent: function()
    {
        this.store = Ext.create('Ext.data.Store', {
            autoLoad: true,
            fields: ['description',  'group_id', 'icon',
                    'key_name', 'mid', 'name', 'state',
                    'uid', 'weight'], 
                
            proxy: {
                type: 'ajax',
                url : '/src/public/module/modulesusers/getModules',
                reader: {
                    type: 'json',
                    root: 'modules'
                }
            }
        });
        
        this.callParent(arguments);
        this.store.sort();

        
    }
    

});



